<?php

/**
 * The <em>_defs.php</em> file contains some base configuration needed to bootstramp
 * StaySimple CMS. The most important thing that you can change is the path to the 
 * base folders.
 * 
 * For development purposes, you can override the settings in here, mainly the 
 * error logging settings, by creating a file named "_defs.local.php". If the 
 * file exists it is included.
 * 
 */
//If needed, change the paths below:
$app = '../simple';
$data = '../simple/data';
$themes = '../simple/themes';
$plugins = '../simple/plugins';

//------------- DON'T EDIT BELOW THIS LINE -------------//
//finding the absolute paths and creating constants
$base = dirname(__FILE__);

define('WEBROOT', realpath($base));
define('APPROOT', realpath($base . '/' . $app));
define('DATAROOT', realpath($base . '/' . $data));
define('THEMEROOT', realpath($base . '/' . $themes));
define('PLUGINROOT', realpath($base . '/' . $plugins));

// Error logging settings
ini_set('error_reporting', E_ALL | E_STRICT);
error_reporting(E_ALL | E_STRICT);

ini_set('log_errors', true);
ini_set('html_errors', false);
ini_set('display_errors', false);
ini_set('error_log', DATAROOT . '/logs/stay.' . time() . '.log');

ini_set('magic_quotes_runtime', 0);

unset($app, $data, $themes, $plugins, $base);

$mode = false;
if (is_file(WEBROOT . '/_defs.local.php')) {
    include WEBROOT . '/_defs.local.php';
}

//setting development
define('DEVELOPMENTMODE', $mode);